﻿using System.ComponentModel.DataAnnotations;
using WebAPI.Util;

namespace InParkRedemptionAPI.Models
{
    public class GetRedemptionAccountListRequest : BasePageInput
    {
        [MaxLength(200, ErrorMessage = "StaffName Max Length Error")]
        public string? StaffName { get; set; }
        [MaxLength(200, ErrorMessage = "LoginName Max Length Error")]
        public string? LoginName { get; set; }
        [MaxLength(250, ErrorMessage = "Email Max Length Error")]
        public string? Email { get; set; }
        public string? OperationArea { get; set; }
        public string? Enable { get; set; } = null;
    }

    public class GetRedemptionAccountListResponse
    {
        public Guid AccountID { get; set; }
        public string? StaffName { get; set; }
        public string LoginName { get; set; }
        public Guid OperationAreaId { get; set; }
        public string? OperationArea { get; set; }
        public string? Email { get; set; }
        public bool Enable { get; set; }
        public string CreateUser { get; set; }
        public string CreateDate { get; set; }
        public string UpdateUser { get; set; }
        public string UpdateDate { get; set; }
    }

    public class UpdateRedemptionAccountRequest
    {
        [Required(ErrorMessage = "AccountID is required")]
        public Guid AccountID { get; set; }
        [Required(ErrorMessage = "OperationAreaID is required")]
        public Guid OperationAreaID { get; set; }

        [MaxLength(200, ErrorMessage = "StaffName Max Length Error")]
        public string? StaffName { get; set; }

        [MaxLength(255, ErrorMessage = "Email Max Length Error")]
        public string? Email { get; set; }

        [MaxLength(50, ErrorMessage = "Password Max Length Error")]
        public string? Password { get; set; }

        [MaxLength(50, ErrorMessage = "ConfirmPassword Max Length Error")]
        public string? ConfirmPassword { get; set; }

        public bool Enable { get; set; }
    }

    public class AddRedemptionAccountRequest
    {
        [MaxLength(200, ErrorMessage = "StaffName Max Length Error")]
        public string? StaffName { get; set; }
        public Guid OperationAreaId { get; set; }
        public string OperationArea { get; set; }

        [Required(ErrorMessage = "LoginName is required")]
        [MaxLength(200, ErrorMessage = "LoginName Max Length Error")]
        public string LoginName { get; set; }

        [MaxLength(255, ErrorMessage = "Email Max Length Error")]
        public string? Email { get; set; }

        [Required(ErrorMessage = "Password is required")]
        [MaxLength(50, ErrorMessage = "Password Max Length Error")]
        public string Password { get; set; }

        [Required(ErrorMessage = "ConfirmPassword is required")]
        [MaxLength(50, ErrorMessage = "ConfirmPassword Max Length Error")]
        public string ConfirmPassword { get; set; }

        public bool Enable { get; set; }
    }

    //public class DeleteRedemptionAccountRequest
    //{
    //    [Required(ErrorMessage = "AccountId is required")]
    //    public List<Guid> AccountIds { get; set; }
    //    [Required(ErrorMessage = "Enable is required")]
    //    public bool Enable { get; set; }
    //}

    public class EnableRedemptionAccountRequest
    {
        [Required(ErrorMessage = "AccountId is required")]
        public string AccountIds { get; set; }

        public bool Enable { get; set; }

    }
}
